package com.lebang.feign;

import com.lebang.feign.fallback.AppInfoFallback;
import com.lebang.model.AppInfo;
import com.lebangweb.response.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ljx
 */
@FeignClient(name = "wangzhuan-basesystem", contextId = "wangzhuan-basesystem-appinfo", fallback = AppInfoFallback.class)
public interface AppInfoFeign {

    /**
     * 查询所有的应用信息
     * @return
     */
    @GetMapping("/api/appinfo/list")
    JsonData list();

    @GetMapping("/api/appinfo/id")
    AppInfo getById(@RequestParam("key")Integer id);
}
